//
//  MLBaseTableViewController.swift
//  MLWeiBo
//
//  Created by wenxing on 2017/1/5.
//  Copyright © 2017年 Se7venX. All rights reserved.
//

import UIKit

class MLBaseTableViewController: UITableViewController,MLVisitorViewDelegate {
    
    
    var isUserLogin:Bool = MLUserAccountViewModel.shared.isUserLogin
    
    lazy var visitorView:MLVisitorView = MLVisitorView()
    
    override func loadView() {
        
        if isUserLogin {

            super.loadView()
            
        }else{
        
            visitorView.delegate = self;
            self.view = visitorView
        
        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        
     
    }
    
    
    func clickLoginButton(vistorView: MLVisitorView) {
        
        let oauth = MLOAuthViewController()
        let nav = MLNavController(rootViewController: oauth)
        
        present(nav, animated: true, completion: nil)
        
        
    }
    
    func clickregisterButton(vistorView: MLVisitorView) {
        
    }



}
